package com.FQJ.stock.mapper;

import com.FQJ.stock.pojo.domain.InnerMarketDomain;
import com.FQJ.stock.pojo.entity.StockMarketIndexInfo;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Entity com.FQJ.stock.pojo.entity.StockMarketIndexInfo
 */
public interface StockMarketIndexInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockMarketIndexInfo record);

    int insertSelective(StockMarketIndexInfo record);

    StockMarketIndexInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockMarketIndexInfo record);

    int updateByPrimaryKey(StockMarketIndexInfo record);
	/**
	 * 根据大盘的id和时间查询大盘信息
	 * @param marketIds 大盘id集合
	 * @param timePoint 当前时间点（默认精确到分钟）
	 * @return
	 */
	List<InnerMarketDomain> getMarketInfo(@Param("marketIds") List<String> marketIds, @Param("timePoint") Date timePoint);

	/**
	 * 统计折线图
	 * @param tStartDate
	 * @param tEndDate
	 * @param inner
	 * @return
	 */
	List<Map> getSumAmtInfo(@Param("tStartDate") Date tStartDate,@Param("tEndDate") Date tEndDate,@Param("inner") List<String> inner);

	/**
	 * 批量插入大盘数据
	 * @param list
	 * @return
	 */
	int insetBatch(@Param("lists") ArrayList<StockMarketIndexInfo> list);
}
